package com.eastcom.providor.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.eastcom.bean.DataSetCollectBean;
import com.eastcom.bm.atom.Atom_DatasetDefine;
import com.eastcom.bm.atom.DataSetStatiBean;
import com.eastcom.client.DataAbnormalStateBean;
import com.eastcom.client.DataSetStateBean;
import com.eastcom.client.IntegerDescBean;
import com.eastcom.client.KpiStateBean;
import com.eastcom.client.NeTypeDataSetBean;
import com.eastcom.client.NeTypeDataSetStatiBean;

public interface IDataSetService {
	
	public List<DataSetStatiBean> selectDataSetStatiBeanFromStatiTable(Date startDate, Date endDate) ;
	
	public List<DataSetStatiBean> selectDataSetStatiBean(Date startDate, Date endDate,int dayCount);
	
	public List<DataSetStatiBean> selectDataSetStatiBeanWithDayGranu(String datasetId,Date startDate, Date endDate) ;
	
	public String selectDataValueByParamsFromSource(String dataSetId, String kpiId, String dimension, Date dataTime);
	
	public int selectDimensionNumByParamsFromSource(String dataSetId, Date dataTime);
	
	public Map<Object,Map> selectDimensionNumByParamsFromSource(String dataSetId, Date start,Date end) ;
	
	public String findDataSetIntegerDescByParam(String dataSetId, Date timeStamp) ;
	
	public List<DataAbnormalStateBean> getIntegerDataAbnormalStateBeansByParam(String dataSetId,List<Date> dataTimes);
	
	public DataAbnormalStateBean getDataAbnormalStateBeanByParam(String dataSetId ,String kpiId, String dimension,String abnormalType,String validationType,Date dataTime,String avgHistoryValue);
	
	public List<DataSetCollectBean> selectAllDataSetCollectBean();
	
	public List<NeTypeDataSetBean> selectDataSetStateWithLastTimeStampDistinguishByNeType(String attentionType) ;
	
	public List<DataSetStateBean> selectDataSetStateByTimeStamp(String dataSetId,long startTime,long endTime);
	
	public List<KpiStateBean> selectKpiStateByDataSetIdAndTimeStamp(String dataSetId,Date timeStamp);
	
	public List<NeTypeDataSetStatiBean> selectAllDataSetStatiBean();
	
	public List<NeTypeDataSetStatiBean> selectDataSetStatiBeanByNeType(String neType, int span, String spanType);
	
	public List<Atom_DatasetDefine> getAllDatasetDefine();
	
	public List<Atom_DatasetDefine> selectDatasetDefineByNeTypeAndCName(String name,String neType,boolean initialKpis);
	
	public boolean saveDataSet(Map datasetDefine);
	
	public boolean editDataSet(Map datasetDefine);
	
	public boolean deleteDataSetById(String id);
	
	public boolean delDatasetByDatasetIDs(List<String> datasetIDs);
	
	public List<DataSetStatiBean> selectAllDataSetStatiBeanWithDayGranu(Date startDate,Date endDate);
	
	public String collectData(String dataset_id, List<String> dates);
	
	public IntegerDescBean selectIntegerDesc(String dataset_id,Date date);
	
	public boolean sendReCollectDataSetCollectBean(String dataSetId);
}
